home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / pmake / lst / RCS / lstAtEnd.c,v < prev    next >
Encoding:
Text File  |  1992-05-19  |  1.5 KB  |  71 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     88.11.17.20.51.48;  author adam;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.3
  21. log
  22. @checked in with -k by kupfer at 92.05.18.17.32.33.
  23. @
  24. text
  25. @/*-
  26.  * LstAtEnd.c --
  27.  *    Add a node at the end of the list
  28.  *
  29.  * Copyright (c) 1988 by the Regents of the University of California
  30.  *
  31.  * Permission to use, copy, modify, and distribute this
  32.  * software and its documentation for any purpose and without
  33.  * fee is hereby granted, provided that the above copyright
  34.  * notice appears in all copies.  Neither the University of California nor
  35.  * Adam de Boor makes any representations about the suitability of this
  36.  * software for any purpose.  It is provided "as is" without
  37.  * express or implied warranty.
  38.  *
  39.  */
  40. #ifndef lint
  41. static char *rcsid =
  42. "$Id: lstAtEnd.c,v 1.3 88/11/17 20:51:48 adam Exp $ SPRITE (Berkeley)";
  43. #endif lint
  44.  
  45. #include    "lstInt.h"
  46.     
  47. /*-
  48.  *-----------------------------------------------------------------------
  49.  * Lst_AtEnd --
  50.  *    Add a node to the end of the given list
  51.  *
  52.  * Results:
  53.  *    SUCCESS if life is good.
  54.  *
  55.  * Side Effects:
  56.  *    A new ListNode is created and added to the list.
  57.  *
  58.  *-----------------------------------------------------------------------
  59.  */
  60. ReturnStatus
  61. Lst_AtEnd (l, d)
  62.     Lst        l;    /* List to which to add the datum */
  63.     ClientData    d;    /* Datum to add */
  64. {
  65.     register LstNode    end;
  66.     
  67.     end = Lst_Last (l);
  68.     return (Lst_Append (l, end, d));
  69. }
  70. @
  71.